3.42 \(\int \sqrt{\sec ^2(x)} \, dx\)

Optimal. Leaf size=3 \[ \sinh ^{-1}(\tan (x)) \]

[Out]

ArcSinh[Tan[x]]

________________________________________________________________________________________

Rubi [A]  time = 0.005895, antiderivative size = 3, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {4122, 215} \[ \sinh ^{-1}(\tan (x)) \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[Sec[x]^2],x]

[Out]

ArcSinh[Tan[x]]

Rule 4122

Int[((b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(b*ff)
/f, Subst[Int[(b + b*ff^2*x^2)^(p - 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{b, e, f, p}, x] &&  !IntegerQ[p
]

Rule 215

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSinh[(Rt[b, 2]*x)/Sqrt[a]]/Rt[b, 2], x] /; FreeQ[{a, b},
 x] && GtQ[a, 0] && PosQ[b]

Rubi steps

\begin{align*} \int \sqrt{\sec ^2(x)} \, dx &=\operatorname{Subst}\left (\int \frac{1}{\sqrt{1+x^2}} \, dx,x,\tan (x)\right )\\ &=\sinh ^{-1}(\tan (x))\\ \end{align*}

Mathematica [B]  time = 0.0093418, size = 44, normalized size = 14.67 \[ \cos (x) \sqrt{\sec ^2(x)} \left (\log \left (\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )\right )-\log \left (\cos \left (\frac{x}{2}\right )-\sin \left (\frac{x}{2}\right )\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[Sec[x]^2],x]

[Out]

Cos[x]*(-Log[Cos[x/2] - Sin[x/2]] + Log[Cos[x/2] + Sin[x/2]])*Sqrt[Sec[x]^2]

________________________________________________________________________________________

Maple [B]  time = 0.071, size = 21, normalized size = 7. \begin{align*} -2\,\cos \left ( x \right ){\it Artanh} \left ({\frac{-1+\cos \left ( x \right ) }{\sin \left ( x \right ) }} \right ) \sqrt{ \left ( \cos \left ( x \right ) \right ) ^{-2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((sec(x)^2)^(1/2),x)

[Out]

-2*cos(x)*arctanh((-1+cos(x))/sin(x))*(1/cos(x)^2)^(1/2)

________________________________________________________________________________________

Maxima [A]  time = 1.73177, size = 4, normalized size = 1.33 \begin{align*} \operatorname{arsinh}\left (\tan \left (x\right )\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((sec(x)^2)^(1/2),x, algorithm="maxima")

[Out]

arcsinh(tan(x))

________________________________________________________________________________________

Fricas [B]  time = 1.42133, size = 61, normalized size = 20.33 \begin{align*} -\frac{1}{2} \, \log \left (\sin \left (x\right ) + 1\right ) + \frac{1}{2} \, \log \left (-\sin \left (x\right ) + 1\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((sec(x)^2)^(1/2),x, algorithm="fricas")

[Out]

-1/2*log(sin(x) + 1) + 1/2*log(-sin(x) + 1)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{\sec ^{2}{\left (x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((sec(x)**2)**(1/2),x)

[Out]

Integral(sqrt(sec(x)**2), x)

________________________________________________________________________________________

Giac [B]  time = 1.33872, size = 47, normalized size = 15.67 \begin{align*} \frac{\log \left ({\left | \frac{1}{\sin \left (x\right )} + \sin \left (x\right ) + 2 \right |}\right )}{4 \, \mathrm{sgn}\left (\cos \left (x\right )\right )} - \frac{\log \left ({\left | \frac{1}{\sin \left (x\right )} + \sin \left (x\right ) - 2 \right |}\right )}{4 \, \mathrm{sgn}\left (\cos \left (x\right )\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((sec(x)^2)^(1/2),x, algorithm="giac")

[Out]

1/4*log(abs(1/sin(x) + sin(x) + 2))/sgn(cos(x)) - 1/4*log(abs(1/sin(x) + sin(x) - 2))/sgn(cos(x))